<template>
	<div id="stut5" class="el-tab-boder" style="width: 100%;margin-bottom: 10px;">
		<div class="d2">
			<div style="width: 100%;margin-top: 15px;">
				<el-radio-group v-model="majorType" fill="#ff7f50" size="mini" @change="getSchool()">
				      <el-radio-button label=2>文史</el-radio-button>
				      <el-radio-button label='1'>理工</el-radio-button>
				</el-radio-group>
				<!-- </br> -->
				<el-radio-group v-model="batch" @change="ycfrom(),getSchool()" fill="#ff7f50" style="margin-left: 20px;" size="mini">
					  <el-radio-button label="提前批A段"></el-radio-button>
					  <el-radio-button label="提前批B段"></el-radio-button>
					  <el-radio-button label="提前批C段"></el-radio-button>
					  <el-radio-button label="提前批专科"></el-radio-button>
				      <el-radio-button label="国家专项"></el-radio-button>
				      <el-radio-button label="地方专项"></el-radio-button>
					  <el-radio-button label="本科一批"></el-radio-button>
					  <el-radio-button label="一批特殊"></el-radio-button>
					  <el-radio-button label="本科二批"></el-radio-button>
					  <el-radio-button label="二批特殊"></el-radio-button>
					  <el-radio-button label="高职专科"></el-radio-button>
				</el-radio-group>
			</div>
					<div style="height: 210px;">
						<span style="font-weight: bold;margin-right: 0.5em;">
							院校名称
						</span>
						<el-row class="demo-autocomplete" style="display: inline-block;width:20%;margin-top: 15px;">
						  <el-col :span="12" style="display: inline-block;width:100%;height: 20px;">
						    <el-autocomplete
						      class="inline-input"
						      v-model="school"
						      :fetch-suggestions="querySearch1"
						      placeholder="请输入内容"
						      :trigger-on-focus="false"
							  size="mini"
							  style="width: 100%;"
						    ></el-autocomplete>
						  </el-col>
						  </el-row>
						  <span style="font-weight: bold;margin-left: 0.5em;margin-right: 0.5em;">专业名称</span>
						  <el-row class="demo-autocomplete" style="display: inline-block;width:20%;height: 20px;">
						  	  <el-col :span="12" style="display: inline-block;width:100%;height: 20px;">
						  	    <el-autocomplete
						  	      class="inline-input"
						  	      v-model="major"
						  	      :fetch-suggestions="querySearch"
						  	      placeholder="请输入内容"
						  	      :trigger-on-focus="false"
						  		  size="mini"
						  		  style="width: 100%;"
						  	    ></el-autocomplete>
						  	  </el-col>
						  	  </el-row>
						<div style="width: 100%;margin: auto;margin-top: 15px;">
							<span style="font-weight: bold;">所在省份</span>
							<ul  class="ul2" v-for="item in cities">
								<li style="line-height: 30px;">
									<el-checkbox-group v-model="checkedCities">
										<el-checkbox style="margin-left:0;font-size: 15px;padding: 0;" :label="item.value"
											:key="item.value"  @change="sfclick(item.label,$event)">{{item.label}}</el-checkbox>
									</el-checkbox-group>
								</li>
							</ul>
						</div>
						<div style="width: 100%;margin: auto;height:20px;margin-top: 5px;">
							<span style="font-weight: bold;">院校类型</span>
							<div style="display: inline-block;width: 58%;">
							<ul class="ul2" v-for="item in SchoolTypes">
								<li>
									<el-checkbox-group v-model="checkedSchoolTypes">
										<el-checkbox style="margin-left:0;font-size: 15px;padding: 0;" :label="item.value"
											:key="item.value" @change="schooltypeclick(item.value,$event)">{{item.value}}</el-checkbox>
									</el-checkbox-group>
								</li>
							</ul>
							</div>
							<div style="display: inline-block;">
							<span style="font-weight: bold;">博硕资格</span>
							<ul class="ul2" v-for="item in Qualifications">
								<li>
									<el-checkbox-group v-model="checkedQualifications">
										<el-checkbox style="margin-left:0;font-size: 15px;padding: 0;" :label="item.value"
											:key="item.value" @change="qualificationsclick(item.value,$event)">{{item.label}}</el-checkbox>
									</el-checkbox-group>
								</li>
							</ul>
								</div>
						</div>
						<div style="width: 100%;margin: auto;height: 40px;">
							<span style="font-weight: bold;">院校层级</span>
							<div style="display: inline-block;width:58%;">
							<ul class="ul2" v-for="item in Hierarchys">
								<li>
									<el-checkbox-group v-model="checkedHierarchys">
										<el-checkbox style="margin-left:0;font-size: 15px;padding: 0;" :label="item.value"
											:key="item.value" @change="hierarchysclick(item.value,$event)">{{item.label}}</el-checkbox>
									</el-checkbox-group>
								</li>
							</ul>
							</div>
							<span style="font-weight: bold;">办学性质</span>
							<ul class="ul2" v-for="item in natures">
								<li>
									<el-checkbox-group v-model="checkedNatures">
										<el-checkbox style="margin-left:0;font-size: 15px;padding: 0;" :label="item.value"
											:key="item.value" @change="natureclick(item.value,$event)">{{item.label}}</el-checkbox>
									</el-checkbox-group>
								</li>
							</ul>
							<button style="margin-left: 1%;cursor: pointer;" @click="getSchool()" class="btn">查询</button>
							<button style="margin-left: 0.5%;cursor: pointer;" @click="Reset()" class="btn">重置</button>
						</div>
					</div>
		
		</div>
		<div style="width: 1440px;min-width: 1440px;margin: auto;overflow:auto;" v-infinite-scroll="isLoad">
			<span style="display: inline-block;font-size: 15px;font-weight: bold;">检索结果：{{count}}</span>
			<!-- 普通 -->
			<el-table v-loading="loading" ref="multipleTable" :data="tableData"
				:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyle" border
				style="width: 100%;color: black;overflow: auto;font-size: 15px;" height="765px" v-show="ptfrom">
				<el-table-column type="expand" width="1">
					<template slot-scope="props">
						<el-table :data="props.row.children" style="width: 100%;font-size: 15px;"
							:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyles" border>
							<el-table-column prop="majorCode" label="专业代码" min-width="9px"></el-table-column>
							<el-table-column prop="majorName" label="专业|专业等级"></el-table-column>
							<el-table-column prop="msg2015" label="计划数/录取数|最高分/平均分/最低分|最高位次-最低位次">
								<el-table-column prop="msg2015" label="2019" min-width="32px"></el-table-column>
								<el-table-column prop="msg2016" label="2020" min-width="32px"></el-table-column>
								<el-table-column prop="msg2017" label="2021" min-width="32px"></el-table-column>
							</el-table-column>
							<el-table-column prop="plan2018" label="22计划" min-width="8px">
								<template slot-scope="scope">
									{{scope.row.plan2018}}{{scope.row.plan2018>scope.row.plan2017?"↑":(scope.row.plan2017>scope.row.plan2018?"↓":"")}}
								</template>
							</el-table-column>
						</el-table>
					</template>
				</el-table-column>
				<el-table-column prop="code" label="院校代码" min-width="15px">
					<template slot-scope="props">
						<span @click="clickTable(props.row)" style="cursor: pointer;">{{props.row.code}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="schoolName" label="院校名称" >
					<template slot-scope="scope">
						<el-popover trigger="hover" placement="bottom-start" popper-class="popover-self">
						          <p style="width: 700px;">{{scope.row.schoolDesc}}</p>
						          <div slot="reference" style="cursor: pointer;font-size: 15px;">
									<span @click="details(scope.row)" style="cursor: pointer;font-size: 15px;margin-left: 1em;">{{scope.row.schoolName}}</span>
						          </div>
						        </el-popover>
					</template>
				</el-table-column>
				<el-table-column prop="toudang2015" label="计划数|投档数 ">
					<el-table-column prop="toudang2019" label="2020" min-width="17px"></el-table-column>
					<el-table-column prop="toudang2020" label="2021" min-width="17px"></el-table-column>
					<el-table-column prop="toudang2021" label="2022" min-width="17px"></el-table-column>
				</el-table-column>

				<el-table-column prop="shift_line2019" label="投档线">
					<el-table-column prop="shiftLine2019" label="2020" min-width="10px"></el-table-column>
					<el-table-column prop="shiftLine2020" label="2021" min-width="10px"></el-table-column>
					<el-table-column prop="shiftLine2021" label="2022" min-width="10px"></el-table-column>
				</el-table-column>
				<el-table-column prop="ranking2019" label="投档位次">
					<el-table-column prop="ranking2019" label="2020" min-width="12px"></el-table-column>
					<el-table-column prop="ranking2020" label="2021" min-width="12px"></el-table-column>
					<el-table-column prop="ranking2021" label="2022" min-width="12px"></el-table-column>
				</el-table-column>
				<el-table-column prop="sortNum" label="综合排名" min-width="15px">
				</el-table-column>
				<el-table-column prop="schoolType" label="院校类型" min-width="15px">
				</el-table-column>
				<el-table-column prop="level" label="层级属性" min-width="18px">
				</el-table-column>
				<el-table-column prop="city" label="所在城市" min-width="18px">
				</el-table-column>
				<el-table-column prop="manager" label="主管部门" min-width="20px">
				</el-table-column>
				<el-table-column prop="majorPlan" label="录取形式" min-width="20px">
				</el-table-column>
				<el-table-column prop="plan2022" label="22计划" min-width="14px">
					<template slot-scope="scope">
						{{scope.row.plan2022}}{{scope.row.plan2022>scope.row.plan2021?"↑":(scope.row.plan2021>scope.row.plan2022?"↓":"")}}
					</template>
				</el-table-column>
			</el-table>
			<!-- 特殊 -->
			<el-table v-loading="loading" ref="multipleTable1" :data="tableData"
				:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyle2" border
				style="width: 100%;color: black;overflow: auto;font-size: 15px;" height="765px" v-show="tsfrom">
				<el-table-column type="expand" width="1">
					<template slot-scope="props">
						<el-table :data="props.row.children" style="width: 100%;"
							:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyles" border>
							<el-table-column prop="majorCode" label="专业代码" min-width="10px"></el-table-column>
							<el-table-column prop="majorName" label="专业|专业等级"></el-table-column>
							<el-table-column prop="msg2015" label="计划数/录取数|最高分/平均分/最低分|最高位次-最低位次">
								<el-table-column prop="msg2015" label="2019" min-width="32px"></el-table-column>
								<el-table-column prop="msg2016" label="2020" min-width="32px"></el-table-column>
								<el-table-column prop="msg2017" label="2021" min-width="32px"></el-table-column>
							</el-table-column>
							<<el-table-column prop="plan2018" label="22计划" min-width="9px">
								<template slot-scope="scope">
									{{scope.row.plan2018}}{{scope.row.plan2018>scope.row.plan2017?"↑":(scope.row.plan2017>scope.row.plan2018?"↓":"")}}
								</template>
							</el-table-column>
						</el-table>
					</template>
				</el-table-column>
				<el-table-column prop="code" label="院校代码" min-width="20px">
					<template slot-scope="props">
						<span @click="clickTable(props.row)" style="cursor: pointer;">{{props.row.code}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="schoolName" label="院校名称">
					<template slot-scope="scope">
						<el-popover trigger="hover" placement="bottom-start" popper-class="popover-self">
						          <p style="width: 700px;">{{scope.row.schoolDesc}}</p>
						          <div slot="reference" style="cursor: pointer;font-size: 15px;">
									<span @click="details(scope.row)" style="cursor: pointer;font-size: 15px;margin-left: 1em;">{{scope.row.schoolName}}</span>
						          </div>
						        </el-popover>
					</template>
				</el-table-column>
				<el-table-column prop="toudang2015" label="计划数|投档数">
					<el-table-column prop="toudang2019" label="2020" min-width="15px"></el-table-column>
					<el-table-column prop="toudang2020" label="2021" min-width="15px"></el-table-column>
					<el-table-column prop="toudang2021" label="2022" min-width="15px"></el-table-column>
				</el-table-column>
			
				<el-table-column prop="shift_line2019" label="平行最低分/控制线/投档最低分">
					<el-table-column prop="shiftLine2019" label="2020" min-width="26px"></el-table-column>
					<el-table-column prop="shiftLine2020" label="2021" min-width="26px"></el-table-column>
					<el-table-column prop="shiftLine2021" label="2022" min-width="26px"></el-table-column>
				</el-table-column>
				<el-table-column prop="ranking2019" label="参考位次">
					<el-table-column prop="ranking2019" label="2020" min-width="20px"></el-table-column>
					<el-table-column prop="ranking2020" label="2021" min-width="20px"></el-table-column>
					<el-table-column prop="ranking2021" label="2022" min-width="20px"></el-table-column>
				</el-table-column>
				<el-table-column prop="sortNum" label="综合排名" min-width="20px">
				</el-table-column>
				<el-table-column prop="schoolType" label="院校类型" min-width="20px">
				</el-table-column>
				<el-table-column prop="level" label="层级属性" min-width="22px">
				</el-table-column>
				<el-table-column prop="city" label="所在城市" min-width="25px">
				</el-table-column>
				<el-table-column prop="manager" label="主管部门" min-width="20px">
				</el-table-column>
				<el-table-column prop="xiancha" label="报考类别" min-width="20px">
				</el-table-column>
				<el-table-column prop="plan2022" label="22计划" min-width="20px">
					<template slot-scope="scope">
						{{scope.row.plan2022}}{{scope.row.plan2022>scope.row.plan2021?"↑":(scope.row.plan2021>scope.row.plan2022?"↓":"")}}
					</template>
				</el-table-column>
			</el-table>
			<!-- 提前 -->
			<el-table v-loading="loading" ref="multipleTable2" :data="tableData"
				:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyle2" border
				style="width: 100%;color: black;overflow: auto;font-size: 15px;" height="765px" v-show="tqfrom">
				<el-table-column type="expand" width="1">
					<template slot-scope="props">
						<el-table :data="props.row.children" style="width: 100%;"
							:header-cell-style="{textAlign: 'center'}" :cell-style="cellStyles" border>
							<el-table-column prop="majorCode" label="专业代码" min-width="8px"></el-table-column>
							<el-table-column prop="majorName" label="专业|专业等级"></el-table-column>
							<el-table-column prop="msg2015" label="计划数/录取数|最高分/平均分/最低分|最高位次-最低位次">
								<el-table-column prop="msg2015" label="2019" min-width="27px"></el-table-column>
								<el-table-column prop="msg2016" label="2020" min-width="27px"></el-table-column>
								<el-table-column prop="msg2017" label="2021" min-width="27px"></el-table-column>
							</el-table-column>
							<el-table-column prop="plan2018" label="22计划" min-width="6px">
								<template slot-scope="scope">
									{{scope.row.plan2018}}{{scope.row.plan2018>scope.row.plan2017?"↑":(scope.row.plan2017>scope.row.plan2018?"↓":"")}}
								</template>
							</el-table-column>
						</el-table>
					</template>
				</el-table-column>
				<el-table-column prop="code" label="院校代码" min-width="25px">
					<template slot-scope="props">
						<span @click="clickTable(props.row)" style="cursor: pointer;">{{props.row.code}}</span>
					</template>
				</el-table-column>
				<el-table-column prop="schoolName" label="院校名称">
					<template slot-scope="scope">
						<el-popover trigger="hover" placement="bottom-start" popper-class="popover-self"> 
						          <p style="width: 700px;">{{scope.row.schoolDesc}}</p>
						          <div slot="reference" style="cursor: pointer;font-size: 15px;">
									<span @click="details(scope.row)" style="cursor: pointer;font-size: 15px;margin-left: 1em;">{{scope.row.schoolName}}</span>
						          </div>
						        </el-popover>
					</template>
				</el-table-column>
				<el-table-column prop="toudang2015" label="计划数|投档数">
					<el-table-column prop="toudang2019" label="2020" min-width="30px"></el-table-column>
					<el-table-column prop="toudang2020" label="2021" min-width="30px"></el-table-column>
					<el-table-column prop="toudang2021" label="2022" min-width="30px"></el-table-column>
				</el-table-column>
			
				<el-table-column prop="fluctuation2019" label="最高分/平均分/最低分">
					<el-table-column prop="shiftLine2019" label="2020" min-width="35px"></el-table-column>
					<el-table-column prop="shiftLine2020" label="2021" min-width="35px"></el-table-column>
					<el-table-column prop="shiftLine2021" label="2022" min-width="35px"></el-table-column>
				</el-table-column>
				<el-table-column prop="ranking2019" label="参考位次">
					<el-table-column prop="ranking2019" label="2020" min-width="25px"></el-table-column>
					<el-table-column prop="ranking2020" label="2021" min-width="25px"></el-table-column>
					<el-table-column prop="ranking2021" label="2022" min-width="25px"></el-table-column>
				</el-table-column>
				<el-table-column prop="xiancha" label="招生类别" min-width="25px">
				</el-table-column>
				<el-table-column prop="schoolType" label="院校类型" min-width="25px">
				</el-table-column>
				<el-table-column prop="level" label="层级属性" min-width="25px">
				</el-table-column>
				<el-table-column prop="city" label="所在城市" min-width="40px">
				</el-table-column>
				<el-table-column prop="manager" label="主管部门" min-width="30px">
				</el-table-column>
				<el-table-column prop="majorPlan" label="资格线" min-width="20px">
				</el-table-column>
				<el-table-column prop="plan2022" label="22计划" min-width="20px">
					<template slot-scope="scope">
						{{scope.row.plan2022}}{{scope.row.plan2022>scope.row.plan2021?"↑":(scope.row.plan2021>scope.row.plan2022?"↓":"")}}
					</template>
				</el-table-column>
				</el-table-column>

			</el-table>
			
		</div>
	</div>
</template>

<script>
	import {
		request
	} from "@/util/request.js"
	const cityOptions = [
		{label:'不限',value:'不限'},{label:'陕西',value:'陕西省'},{label:'安徽',value:'安徽省'},{label:'北京',value:'北京市'},{label:'重庆',value:'重庆市'},
		{label:'福建',value:'福建省'},{label:'广东',value:'广东省'},{label:'广西',value:'广西'},{label:'甘肃',value:'甘肃省'},{label:'贵州',value:'贵州省'},
		{label:'河北',value:'河北省'},{label:'河南',value:'河南省'},{label:'海南',value:'海南省'},{label:'湖北',value:'湖北省'},{label:'湖南',value:'湖南省'},
		{label:'黑龙江',value:'黑龙江省'},{label:'吉林',value:'吉林省'},{label:'江苏',value:'江苏省'},{label:'江西',value:'江西省'},{label:'辽宁',value:'辽宁省'},
		{label:'内蒙古',value:'内蒙古'},{label:'宁夏',value:'宁夏'},{label:'青海',value:'青海省'},{label:'上海',value:'上海市'},
		{label:'四川',value:'四川省'},{label:'山东',value:'山东省'},{label:'山西',value:'山西省'},{label:'天津',value:'天津市'},{label:'西藏',value:'西藏'},
		{label:'新疆',value:'新疆'},{label:'云南',value:'云南省'},{label:'浙江',value:'浙江省'},{label:'其他',value:'其他'}
	]
	const SchoolTypeOptions = [
		{label:'不限',value:'不限'},{label:'综合',value:'综合'},{label:'工科',value:'工科'},{label:'财经',value:'财经'},{label:'农业',value:'农业'},{label:'林业',value:'林业'},
		{label:'医药',value:'医药'},{label:'师范',value:'师范'},{label:'体育',value:'体育'},{label:'政法',value:'政法'},{label:'民族',value:'民族'},
		{label:'语言',value:'语言'},{label:'军事',value:'军事'},{label:'艺术',value:'艺术'},{label:'其他',value:'其他'}
	]
	const natureOptions = [
		{label:'不限',value:'不限'},{label:'公办',value:'1'},{label:'民办',value:'2'},{label:'合办',value:'3'}
	]
	const HierarchyOptions = [
		{label:'不限',value:'不限'},{label:'双一流',value:'1'},{label:'中央直管',value:'2'},{label:'985',value:'3'},{label:'211',value:'4'},{label:'双高计划',value:'5'},{label:'国家示范(骨干)',value:'6'}
	]
	const QualificationsOptions = [
		{label:'不限',value:'不限'},{label:'硕士点',value:'1'},{label:'博士点',value:'2'},{label:'研究生院',value:'3'},{label:'自划线',value:'4'},{label:'推免资格',value:'5'}
	]
	export default {
		data() {
			return {
				activeName: "first",
				count:null,
				ptfrom:true,
				tsfrom:false,
				tqfrom:false,
				props: {
					multiple: true
				},
				loading: true,
				value: [],
				options: [],
				schoolNames: [],
				tableData: [],
				drawer: false,
				index: 0,
				batch: '本科一批',
				isLoad: false,
				Submit: 1,
				major: '',
				user: [],
				scheme: [],
				majorType:'1',
				childrenData: [],
				school: '',
				cities: cityOptions,
				SchoolTypes: SchoolTypeOptions,
				natures: natureOptions,
				Hierarchys: HierarchyOptions,
				Qualifications: QualificationsOptions,
				checkedCities: ['不限'],
				checkedSchoolTypes: ['不限'],
				checkedNatures: ['不限'],
				checkedHierarchys: ['不限'],
				checkedQualifications: ['不限'],
				isDisable: true,
				comeTime: 0,
				pageObject: {
					pageNum: 1,
					pageSize: 40,
					total: 0
				},
			}
		},
		methods: {
			//执行点击行调用的方法，展开和折叠行
			clickTable(row,index,e){ 
			    this.$refs.multipleTable.toggleRowExpansion(row)
				this.$refs.multipleTable1.toggleRowExpansion(row)
				this.$refs.multipleTable2.toggleRowExpansion(row)
			 },
			ycfrom(){
				if(this.batch==='提前批A段'||this.batch==='提前批B段'||this.batch==='提前批C段'||this.batch==='提前批专科'){
					this.tqfrom=true
					this.ptfrom=false
					this.tsfrom=false
				}else if(this.batch==='一批特殊'||this.batch==='二批特殊'){
					this.tsfrom=true
					this.tqfrom=false
					this.ptfrom=false
				}else{
					this.tsfrom=false
					this.tqfrom=false
					this.ptfrom=true
				}
			},
			sfclick(e,t){
				if(e==='不限'){
					this.checkedCities=['不限']
				}else if(e==='其他'){
					this.checkedCities=['其他']
				}else{
					this.checkedCities.forEach(i=>{
						if(i=='不限'||i=='其他'){
							this.checkedCities.splice(this.checkedCities.indexOf(i),1)
						}
					})
					if(t==false&&this.checkedCities.length<1){
						this.checkedCities=['不限']
					}
				}
			},
			schooltypeclick(e,t){
				if(e==='不限'){
					this.checkedSchoolTypes=['不限']
				}else if(e==='其他'){
					this.checkedSchoolTypes=['其他']
				}else{
					this.checkedSchoolTypes.forEach(i=>{
						if(i=='不限'||i=='其他'){
							this.checkedSchoolTypes.splice(this.checkedSchoolTypes.indexOf(i),1)
						}
					})
					if(t==false&&this.checkedSchoolTypes.length<1){
						this.checkedSchoolTypes=['不限']
					}
				}
			},
			natureclick(e,t){
				if(e==='不限'){
					this.checkedNatures=['不限']
				}else{
					this.checkedNatures.forEach(i=>{
						if(i=='不限'){
							this.checkedNatures.splice(this.checkedNatures.indexOf(i),1)
						}
					})
					if(t==false&&this.checkedNatures.length<1){
						this.checkedNatures=['不限']
					}
				}
			},
			hierarchysclick(e,t){
				if(e==='不限'){
					this.checkedHierarchys=['不限']
				}else{
					this.checkedHierarchys.forEach(i=>{
						if(i=='不限'){
							this.checkedHierarchys.splice(this.checkedHierarchys.indexOf(i),1)
						}
					})
					if(t==false&&this.checkedHierarchys.length<1){
						this.checkedHierarchys=['不限']
					}
				}
			},
			qualificationsclick(e,t){
				if(e==='不限'){
					this.checkedQualifications=['不限']
				}else{
					this.checkedQualifications.forEach(i=>{
						if(i=='不限'){
							this.checkedQualifications.splice(this.checkedQualifications.indexOf(i),1)
						}
					})
					if(t==false&&this.checkedQualifications.length<1){
						this.checkedQualifications=['不限']
					}
				}
			},
			querySearch(queryString, cb) {
			        var restaurants = this.options;
			        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
			        // 调用 callback 返回建议列表的数据
			        cb(results);
			      },
			createFilter(queryString) {	
			        return (restaurant) => {
			          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
			        };
			      },
			querySearch1(queryString, cb) {
			        var restaurants = this.schoolNames;
			        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
			        // 调用 callback 返回建议列表的数据
			        cb(results);
			      },
			createFilter1(queryString) {	
			        return (restaurant) => {
			          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
			        };
			      },
			Reset() {
				this.checkedCities = ['不限']
				this.checkedSchoolTypes = ['不限']
				this.checkedNatures = ['不限']
				this.checkedHierarchys = ['不限']
				this.checkedQualifications=['不限']
				this.major = null
				this.school = null
			},
			details(row) {
				const infos = row;
				localStorage.setItem('infos', JSON.stringify(infos))
				const routeData=this.$router.resolve({
					name: 'school',
					params: {
						info: infos
					}
				})
				window.open(routeData.href, '_blank')
			},
			getMajor() {
				request({
					method: 'get',
					url: 'school/getMajor',
				}).then(res => {
					this.options = res.data
				})
			},
			getSchoolName() {
				request({
					method: 'post',
					url: 'school/getSchoolName',
					params:{
						majorType:this.majorType,
						batch:this.batch
					}
				}).then(res => {
					this.schoolNames = res.data
				})
			},
			// 单元格的 style 的回调方法
			cellStyle({
				row,
				column,
				rowIndex,
				columnIndex
			}) {
				if (columnIndex === 1 ) {
					return `textAlign:center;color:#1264ff`;
				}else if( columnIndex===2){
					return `textAlign:left;color:#1264ff`;
				}else if(columnIndex===5||columnIndex===8||columnIndex===11){
					return `textAlign:center;font-weight:bold;`;
				}else if(columnIndex==18){
					if(row.plan2022>row.plan2021){
						return 'color:green;textAlign:center'
					}else if(row.plan2022<row.plan2021){
						return 'color:red;textAlign:center'
					}
					return 'textAlign:center;'
				}else {
						return 'textAlign:center;'
				}
			},
			cellStyle2({
				row,
				column,
				rowIndex,
				columnIndex
			}) {
				if (columnIndex === 1 ) {
					return `textAlign:center;color:#1264ff`;
				}else if( columnIndex===2){
					return `textAlign:left;color:#1264ff`;
				}else if(columnIndex===5||columnIndex===8||columnIndex===11){
					return `textAlign:center;font-weight:bold;`;
				}else if(columnIndex==18){
					if(row.plan2022>row.plan2021){
						return 'color:green;textAlign:center'
					}else if(row.plan2022<row.plan2021){
						return 'color:red;textAlign:center'
					}
					return 'textAlign:center;'
				}else {
						return 'textAlign:center;'
				}
			},
			cellStyles({
				row,
				column,
				rowIndex,
				columnIndex
			}) {
				if(row.color=="red"){
					if (columnIndex === 1) {
						return `textAlign:left;color:red;`;
					}else {
							if(columnIndex==5&&row.plan2018>row.plan2017){
								return 'color:green;textAlign:center;color:red;'
							}else if(columnIndex==5&&row.plan2018<row.plan2017){
								return 'color:red;textAlign:center;color:red;'
							}
							return 'textAlign:center;color:red;'
						
					}
				}else{
					if (columnIndex === 1) {
						return `textAlign:left;`;
					}else {
							if(columnIndex==5&&row.plan2018>row.plan2017){
								return 'color:green;textAlign:center'
							}else if(columnIndex==5&&row.plan2018<row.plan2017){
								return 'color:red;textAlign:center'
							}
							return 'textAlign:center;'
						
					}
				}
				
			},
			change() {
				this.isLong = this.value.length > 3;
			},
			getSchool() {
				this.loading = true
				var hierarchys="";
				if(this.checkedHierarchys.length>0){
					for(var i=0;i<this.checkedHierarchys.length;i++){
						if(i<this.checkedHierarchys.length-1){
							hierarchys+=this.checkedHierarchys[i]+"|";
						}else{
							hierarchys+=this.checkedHierarchys[i];
						}
					}
				}		
				var qualifications="";
				if(this.checkedQualifications.length>0){
					for(var i=0;i<this.checkedQualifications.length;i++){
						if(i<this.checkedQualifications.length-1){
							qualifications+=this.checkedQualifications[i]+"|";
						}else{
							qualifications+=this.checkedQualifications[i];
						}
					}
				}
				if(this.checkedCities=='不限'){
					this.pageObject.city=[]
				}else{
					this.pageObject.city = this.checkedCities
				}
				if(this.checkedNatures=='不限'){
					this.pageObject.nature=[]
				}else{
					this.pageObject.nature = this.checkedNatures
				}
				if(this.checkedHierarchys=='不限'){
					this.pageObject.hierarchys=''
				}else{
					this.pageObject.hierarchys = hierarchys
				}
				if(this.checkedSchoolTypes=='不限'){
					this.pageObject.type=[]
				}else{
					this.pageObject.type = this.checkedSchoolTypes
				}
				if(this.checkedQualifications=='不限'){
					this.pageObject.qualifications=''
				}else{
					this.pageObject.qualifications = qualifications	
				}
				
				this.pageObject.major=this.major
				this.pageObject.school=this.school
				this.pageObject.batch = this.batch
				this.pageObject.majorType=this.majorType
				const _this = this
				this.Submit = 1;
				request({
					method: 'post',
					url: 'school/getStuSchoolInformation',
					data: this.pageObject
				}).then(res => {
					res.data.list.forEach(i => i.schemeName = "")
					if (this.tableData) {
						for (var i = 0; i < res.data.list.length; i++) {
							_this.childrenData.forEach(j => {
								if (res.data.list[i].code == j.schoolCode) {
									res.data.list[i].schemeName = j.schemeName
									if(j.majorList!=null&&j.majorList!=undefined&&j.majorList!=""){
										for (var r = 0; r < j.majorList.length; r++) {
											res.data.list[i].children.forEach(o => {
												if (j.majorList[r].majorCode == o.majorCode) {
													o.sort = j.majorList[r].sort
												}
											})
										}
									}
								}
							})
						}
						this.tableData = res.data.list
						this.count=res.data.total
					} else {
						this.tableData = res.data.list
						this.count=res.data.total
					}
					this.loading = false
					
				})
			},
			scroll() {
				this.$refs.multipleTable.bodyWrapper.addEventListener('scroll', (res) => {
					let height = res.target;
					let clientHeight = height.clientHeight;
					let scrollTop = height.scrollTop;
					let scrollHeight = height.scrollHeight;
					if (clientHeight + Math.ceil(scrollTop)+1 >= scrollHeight && this.comeTime == 0 && this
						.isDisable == true) {
						this.comeTime = 1;
						setTimeout(() => {
							var hierarchys="";
							if(this.checkedHierarchys.length>0){
								for(var i=0;i<this.checkedHierarchys.length;i++){
									if(i<this.checkedHierarchys.length-1){
										hierarchys+=this.checkedHierarchys[i]+"|";
									}else{
										hierarchys+=this.checkedHierarchys[i];
									}
								}
							}		
							var qualifications="";
							if(this.checkedQualifications.length>0){
								for(var i=0;i<this.checkedQualifications.length;i++){
									if(i<this.checkedQualifications.length-1){
										qualifications+=this.checkedQualifications[i]+"|";
									}else{
										qualifications+=this.checkedQualifications[i];
									}
								}
							}
							
							if(this.checkedCities=='不限'){
								this.pageObject.city=[]
							}else{
								this.pageObject.city = this.checkedCities
							}
							if(this.checkedNatures=='不限'){
								this.pageObject.nature=[]
							}else{
								this.pageObject.nature = this.checkedNatures
							}
							if(this.checkedHierarchys=='不限'){
								this.pageObject.hierarchys=''
							}else{
								this.pageObject.hierarchys = hierarchys
							}
							if(this.checkedSchoolTypes=='不限'){
								this.pageObject.type=[]
							}else{
								this.pageObject.type = this.checkedSchoolTypes
							}
							if(this.checkedQualifications=='不限'){
								this.pageObject.qualifications=''
							}else{
								this.pageObject.qualifications = qualifications	
							}
							this.pageObject.major = this.major
							this.pageObject.school=this.school
							this.pageObject.batch = this.batch
							this.pageObject.majorType=this.majorType
							const Submits = {
								...this.pageObject
							}
							this.Submit = this.Submit + 1;
							Submits.pageNum = this.Submit
							this.loading=true;
							request({
								method: 'post',
								url: 'school/getStuSchoolInformation',
								data: Submits
							}).then(res => {
								res.data.list.forEach(i => i.schemeName = "")
								if (this.tableData) {
									for (var i = 0; i < res.data.list.length; i++) {
										this.childrenData.forEach(j => {
											if (res.data.list[i].code == j.schoolCode) {
												res.data.list[i].schemeName = j.schemeName
											}
										})
									}
									res.data.list.forEach(i => {
										if (this.tableData.indexOf(i) == -1) {
											this.tableData.push(i)
										}
									})
								} else {
									this.tableData = res.data.list
								}
								this.loading = false
							})
							this.isDisable = false
						}, 500);
					}
					this.comeTime = 0;
					this.isDisable = true;

				}, true);
				this.$refs.multipleTable1.bodyWrapper.addEventListener('scroll', (res) => {
					let height = res.target;
					let clientHeight = height.clientHeight;
					let scrollTop = height.scrollTop;
					let scrollHeight = height.scrollHeight;
					if (clientHeight + Math.ceil(scrollTop)+1 >= scrollHeight && this.comeTime == 0 && this
						.isDisable == true) {
						this.comeTime = 1;
						setTimeout(() => {
							var hierarchys="";
							if(this.checkedHierarchys.length>0){
								for(var i=0;i<this.checkedHierarchys.length;i++){
									if(i<this.checkedHierarchys.length-1){
										hierarchys+=this.checkedHierarchys[i]+"|";
									}else{
										hierarchys+=this.checkedHierarchys[i];
									}
								}
							}		
							var qualifications="";
							if(this.checkedQualifications.length>0){
								for(var i=0;i<this.checkedQualifications.length;i++){
									if(i<this.checkedQualifications.length-1){
										qualifications+=this.checkedQualifications[i]+"|";
									}else{
										qualifications+=this.checkedQualifications[i];
									}
								}
							}
							
							if(this.checkedCities=='不限'){
								this.pageObject.city=[]
							}else{
								this.pageObject.city = this.checkedCities
							}
							if(this.checkedNatures=='不限'){
								this.pageObject.nature=[]
							}else{
								this.pageObject.nature = this.checkedNatures
							}
							if(this.checkedHierarchys=='不限'){
								this.pageObject.hierarchys=''
							}else{
								this.pageObject.hierarchys = hierarchys
							}
							if(this.checkedSchoolTypes=='不限'){
								this.pageObject.type=[]
							}else{
								this.pageObject.type = this.checkedSchoolTypes
							}
							if(this.checkedQualifications=='不限'){
								this.pageObject.qualifications=''
							}else{
								this.pageObject.qualifications = qualifications	
							}
							this.pageObject.major = this.major
							this.pageObject.school=this.school
							this.pageObject.batch = this.batch
							this.pageObject.majorType=this.majorType
							const Submits = {
								...this.pageObject
							}
							this.Submit = this.Submit + 1;
							Submits.pageNum = this.Submit
							this.loading=true
							request({
								method: 'post',
								url: 'school/getStuSchoolInformation',
								data: Submits
							}).then(res => {
								res.data.list.forEach(i => i.schemeName = "")
								if (this.tableData) {
									for (var i = 0; i < res.data.list.length; i++) {
										this.childrenData.forEach(j => {
											if (res.data.list[i].code == j.schoolCode) {
												res.data.list[i].schemeName = j.schemeName
											}
										})
									}
									res.data.list.forEach(i => {
										if (this.tableData.indexOf(i) == -1) {
											this.tableData.push(i)
										}
									})
								} else {
									this.tableData = res.data.list
								}
								this.loading = false
							})
							this.isDisable = false
						}, 500);
					}
					this.comeTime = 0;
					this.isDisable = true;
				
				}, true);
				this.$refs.multipleTable2.bodyWrapper.addEventListener('scroll', (res) => {
					let height = res.target;
					let clientHeight = height.clientHeight;
					let scrollTop = height.scrollTop;
					let scrollHeight = height.scrollHeight;
					if (clientHeight + Math.ceil(scrollTop)+1 >= scrollHeight && this.comeTime == 0 && this
						.isDisable == true) {
						this.comeTime = 1;
						setTimeout(() => {
							var hierarchys="";
							if(this.checkedHierarchys.length>0){
								for(var i=0;i<this.checkedHierarchys.length;i++){
									if(i<this.checkedHierarchys.length-1){
										hierarchys+=this.checkedHierarchys[i]+"|";
									}else{
										hierarchys+=this.checkedHierarchys[i];
									}
								}
							}		
							var qualifications="";
							if(this.checkedQualifications.length>0){
								for(var i=0;i<this.checkedQualifications.length;i++){
									if(i<this.checkedQualifications.length-1){
										qualifications+=this.checkedQualifications[i]+"|";
									}else{
										qualifications+=this.checkedQualifications[i];
									}
								}
							}
							
							if(this.checkedCities=='不限'){
								// console.log("所以他进来了哦")
								this.pageObject.city=[]
							}else{
								this.pageObject.city = this.checkedCities
							}
							if(this.checkedNatures=='不限'){
								this.pageObject.nature=[]
							}else{
								this.pageObject.nature = this.checkedNatures
							}
							if(this.checkedHierarchys=='不限'){
								this.pageObject.hierarchys=''
							}else{
								this.pageObject.hierarchys = hierarchys
							}
							if(this.checkedSchoolTypes=='不限'){
								this.pageObject.type=[]
							}else{
								this.pageObject.type = this.checkedSchoolTypes
							}
							if(this.checkedQualifications=='不限'){
								this.pageObject.qualifications=''
							}else{
								this.pageObject.qualifications = qualifications	
							}
							this.pageObject.major = this.major
							this.pageObject.school=this.school
							this.pageObject.batch = this.batch
							this.pageObject.majorType=this.majorType
							const Submits = {
								...this.pageObject
							}
							this.Submit = this.Submit + 1;
							Submits.pageNum = this.Submit
							this.loading=true
							request({
								method: 'post',
								url: 'school/getStuSchoolInformation',
								data: Submits
							}).then(res => {
								res.data.list.forEach(i => i.schemeName = "")
								if (this.tableData) {
									for (var i = 0; i < res.data.list.length; i++) {
										this.childrenData.forEach(j => {
											if (res.data.list[i].code == j.schoolCode) {
												res.data.list[i].schemeName = j.schemeName
											}
										})
									}
									res.data.list.forEach(i => {
										if (this.tableData.indexOf(i) == -1) {
											this.tableData.push(i)
										}
									})
								} else {
									this.tableData = res.data.list
								}
								this.loading = false
							})
							this.isDisable = false
						}, 500);
					}
					this.comeTime = 0;
					this.isDisable = true;
				
				}, true);
			},

		},
		mounted() {
			// 注意一定要保证DOM渲染完成后在进行合并操作，否则会找不到元素
			// this.$nextTick(function() {
			// 	this.setColSpan();
			// })
			setTimeout(this.scroll(), 2000)
		},
		created() {
			const user = sessionStorage.getItem("user");
			this.user = JSON.parse(user)
			this.getSchool()
			this.getMajor()
			this.getSchoolName()

		}
	};
</script>

<style>
	#stut5 {
		margin: 0;
		padding: 0;
		font-size: 15px;
	}

	#stut5 .btn {
		width: 80px;
		height: 30px;
		background-color: coral;
		color: #fff;
		-moz-border-radius: 10px;
		-webkit-border-radius: 10px;
		border-radius: 10px;
		-khtml-border-radius: 10px;
		text-align: center;
		border: 1px solid transparent;
		font-weight: 900;
		margin-top: 10px;
		margin-left: 1px;
		font-size: 15px;
		border-radius: 5px;
	}

	#stut5 .d2 {
		width: 1440px;
		min-width: 1440px;
		margin: auto;
	}

	#stut5 th {
		font-weight: 500;
		height: 50px;
		border: 1px #68696a solid;
	}

	#stut5 select {
		color: black;
		border: 1px black solid;
		width: 9%;
		text-align: center;
		margin-left: 1%;
	}

	#stut5 .d2 ul {
		list-style: none;
		display: inline-block;
		padding: 0;
		margin: 0;
	}

	#stut5 .d2 ul li {
		display: inline-block;
		margin-left: 2px;
		font-size: 15px;
	}


	#stut5 span {
		font-size: 15px;
	}

	#stut5 input {
		border: 1px #68696a solid;
		border-radius: 5px;
		
	}

	#stut5 .el-checkbox__input {
		display: none;
	}

	#stut5 .has-gutter .cell {
		padding: 0;
		color: black;
	}

	#stut5 .el-table__row td div {
		padding: 0;
	}

	#stut5 .el-table__row td {
		padding: 0;
		height: 28px;
	}

	#stut5 .has-gutter th {
		padding: 0;
		height: 28px;
	}

	#stut5 .cell{
		padding: 0;
	}

	.establishBtn{
		padding: 0;
		text-align: center;
	}

	.establishBtn span {
		display: inline-block;
		margin-left: 8px;
	}
	
	#tab-third{
		font-size: 15px;
	}
	#stut5 .el-tabs__header{
		margin: 0 0 0 0;
	}
	
	#stut5 .el-table__cell {
		padding: 0rem 0rem 0rem 0rem;
	}
	.popover-self *{
		padding: 0 0 0 0;
		margin: 0 0 0 0;
	}
	#stut5 .el-tabs__item{
		font-size: 15px;
	}
	#stut5 .el-checkbox{
		font-size: 15px;
		color: #000000;
	}
</style>
